const http = require('http');
const server = http.createServer();
const fs = require('fs');
const path = require('path')
fs.readFile(path.join(__dirname,'./练习/轮播图.css'),'utf8',function(err,data){
    if(err){
        return console.log(err.message);
    }else{
        server.on('request',(req,res)=>{
            console.log(`请求地址：${req.url},请求方式：${req.method}`);
            res.end(data)
        });
        server.listen('8081',()=>{
            console.log(`你正在访问:http://127.0.0.1:8081`);
        })
    }
})
